package com.second.app.thread.synchroized.F;

/**
 * @Author GYZ
 * <pre>
 *
 * </pre>
 */
public class Service {

    public static void print(Object object){

        try {
            synchronized (object){
                while (true){
                    System.out.println(Thread.currentThread().getName());
                    Thread.sleep(1000);
                }
            }
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    }
}
